package org.aj.action.admin;

import javax.annotation.Resource;

import org.aj.entity.Vender;
import org.aj.service.VenderService;
import org.apache.struts2.convention.annotation.ParentPackage;

/**
 * 签约厂商管理
 * 
 * @author AJ
 */
@ParentPackage("admin")
public class VenderAction extends BaseAdminAction {

	private static final long serialVersionUID = 1L;
	
	@Resource
	private VenderService venderService;
	
	private Vender vender;
	
	public String list() {
		pager = venderService.findByPager(pager);
		return LIST;
	}
	
	public String add() {
		return INPUT;
	}
	
	public String eidt() {
		vender = venderService.get(id);
		return INPUT;
	}
	
	public String delete() {
		//TODO 删除
		
		flushCache();
		return ajaxJsonSuccessMessage("删除成功！");
	}
	
	//Getters and Setters

	public Vender getVender() {
		return vender;
	}

	public void setVender(Vender vender) {
		this.vender = vender;
	}

}
